#ifndef __STRATEGY__
#define __STRATEGY__

#include <iostream>

using namespace std;


class Strategy
{
	public:
		virtual ~Strategy() {};
		virtual void AlgorithmInterface() = 0;
};


class ConcreteStrategy1: public Strategy
{
	public:
		ConcreteStrategy1() {};
		virtual ~ConcreteStrategy1() {};
		virtual void AlgorithmInterface()
		{
			cout << "ConcreteStrategy1 AlgorithmInterface\n";
			return;
		}
};


class ConcreteStrategy2: public Strategy
{
	public:
		ConcreteStrategy2() {};
		virtual ~ConcreteStrategy2() {};
		virtual void AlgorithmInterface()
		{
			cout << "ConcreteStrategy2 AlgorithmInterface\n";
			return;
		}
};



class Context
{
	public:
		Context(Strategy* pStrategy):a_pStrategy(pStrategy) {};
		virtual ~Context() {};

		void ContextInterface()
		{
			cout << "ContextInterface\n";
			a_pStrategy->AlgorithmInterface();
		}

		void SetStrategy(Strategy* pStrategy)
		{
			a_pStrategy = pStrategy;
		}
		
	private:
		Strategy* a_pStrategy;

};

#endif
